import requests
import time
from urllib.parse import quote
cookies = {
    'sidebarStatus': '0',
}

Authorization = 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJjcmVhdGVfdGltZSI6IjIwMjUtMDktMDEgMTA6MDE6NTciLCJhdXRoX3Rva2VuIjoiNzM5MjkzOTRjM2MwNDliZWE4ZTRjOGU2ZDIxMjUzMDYiLCJ1c2VyX2NvZGUiOiIxODMyMzQwNjcwMCIsInVzZXJfaWQiOiIxOTIyMjA3NTYzMjI2Njk4NTI5In0.v9I2f3RiZ0v2wvCNLiWtLNu7A8D5BE_6cYJLpZxAw4vPM4uqzWWLxSv3FTYxJ8_AURWAMwYHm1TUyWGM_WTddA'
cookie = 'rio_sid_wxworkoauth=0fsst96iqux69mpe8zfqfajmf0gx5b6:dpsk; gray_version=v1.0.11; sidebarStatus=0; access_token=eyJhbGciOiJIUzUxMiJ9.eyJjcmVhdGVfdGltZSI6IjIwMjUtMDktMDEgMTA6MDE6NTciLCJhdXRoX3Rva2VuIjoiNzM5MjkzOTRjM2MwNDliZWE4ZTRjOGU2ZDIxMjUzMDYiLCJ1c2VyX2NvZGUiOiIxODMyMzQwNjcwMCIsInVzZXJfaWQiOiIxOTIyMjA3NTYzMjI2Njk4NTI5In0.v9I2f3RiZ0v2wvCNLiWtLNu7A8D5BE_6cYJLpZxAw4vPM4uqzWWLxSv3FTYxJ8_AURWAMwYHm1TUyWGM_WTddA'
responseChatItemId = 'qLBSsAR4U88PI7XtoylqeLCk'
chatId = 'uxVuswieR0QbMPqLS2hLrGUW'
shareId = 'igalbyrcd9wrbpxmhyndaw1s'
outLinkUid = 'dsk07bd2cb3621b23f7e377f83df2cca23a'
staffId = 'rrYetppEvX7ONYaZ9bcjsg=='

headers = {
    "Accept-Encoding": "gzip, deflate, br",
    "Accept-Language": "zh-CN",
    "Authorization": Authorization,
    "Connection": "keep-alive",
    "Content-Length": "899",
    "Content-Type": "application/json",
    "Cookie": cookie,
    "Host": "reasoningai.elink.spic.com.cn",
    "Origin": "https://reasoningai.elink.spic.com.cn",
    "Referer": 'https://reasoningai.elink.spic.com.cn/deepseek?access_token=eyJhbGciOiJIUzUxMiJ9.eyJjcmVhdGVfdGltZSI6IjIwMjUtMDktMDEgMTA6MDE6NTciLCJhdXRoX3Rva2VuIjoiNzM5MjkzOTRjM2MwNDliZWE4ZTRjOGU2ZDIxMjUzMDYiLCJ1c2VyX2NvZGUiOiIxODMyMzQwNjcwMCIsInVzZXJfaWQiOiIxOTIyMjA3NTYzMjI2Njk4NTI5In0.v9I2f3RiZ0v2wvCNLiWtLNu7A8D5BE_6cYJLpZxAw4vPM4uqzWWLxSv3FTYxJ8_AURWAMwYHm1TUyWGM_WTddA',
    "Sec-Fetch-Dest": "empty",
    "Sec-Fetch-Mode": "cors",
    "Sec-Fetch-Site": "same-origin",
    "Smart-Proxy-Key": "74C49E49ED0EEBE735CA6CB9DC9A76D3",
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) WXWorkLocal/3.0.60000 Chrome/106.0.5249.199 Electron/21.4.4 Safari/537.36 wxworklocal/3.0.60000 WXWorklocalClientType/Windows wxwork/3.0.60000 wwlocal/1.0 WXDrive/2.0 MicroMessenger/6.3.22 74C49E49ED0EEBE735CA6CB9DC9A76D3",
    "accept": "text/event-stream",
    "sec-ch-ua": "\"Not;A=Brand\";v=\"99\", \"Chromium\";v=\"106\"",
    "sec-ch-ua-mobile": "?0"
}

# 任意问题
def anyquestion(num):

    json_data = {"messages":[{"dataId":"vbJhRSY20i8DOb3P2Y1xYqAG","hideInUI":False,"role":"user","content":"你好"}],"variables":{"llm_type":1,"search_func":0},"responseChatItemId":responseChatItemId,"chatId":chatId,"shareId":shareId,"outLinkUid":outLinkUid,"detail":True,"stream":True,"bizType":"common","dtyFile":"","retainDatasetCite":True,"staffId":staffId,"visitFrom":"DTY"}
    for i in range(num):
        try:
            response = requests.post('https://reasoningai.elink.spic.com.cn/qaapi/qaassistant/api/v1/chat/completions',
                                     cookies=cookies, headers=headers, json=json_data, timeout=2)
            print('任意问题 运行:', i, '次', response.text)
        except requests.exceptions.Timeout:
            print('任意问题 运行:', i, '次超时')

# 文件提问
def upload(num):
    json_data = {"messages":[{"dataId":"xhz135gckDZ4TrGp2gXVKlUd","hideInUI":False,"role":"user","content":[{"type":"file_url","name":"新建 文本文档.txt","url":"/api/common/file/read/新建+文本文档.txt?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJidWNrZXROYW1lIjoiY2hhdCIsInRlYW1JZCI6IjY3MTc2ZDk3NTM1YjQzMDFlOGQ0ODAzOSIsInVpZCI6IjY3MTc2ZDk3NTM1YjQzMDFlOGQ0ODA0NSIsImZpbGVJZCI6IjY4YjQzYjYxM2M2MjYxYTVhN2ZhYjU2NSIsImV4cCI6MTc1NzI0Njk0NSwiaWF0IjoxNzU2NjQyMTQ1fQ.GpTOUHS-5s3tIZlbTEYMuErVyD4fERn_CrnChktrIqA"},{"type":"text","text":"这是什么？"}]}],"variables":{"llm_type":1,"search_func":0},"responseChatItemId":responseChatItemId,"chatId":chatId,"shareId":shareId,"outLinkUid":outLinkUid,"detail":True,"stream":True,"bizType":"common","dtyFile":"","retainDatasetCite":True,"staffId":staffId,"visitFrom":"DTY"}

    for i in range(num):
        try:
            response = requests.post('https://reasoningai.elink.spic.com.cn/qaapi/qaassistant/api/v1/chat/completions',
                                     cookies=cookies, headers=headers, json=json_data,timeout=2)
            print('文件提问:', i, '次',response)
        except requests.exceptions.Timeout:
            print('文件提问 运行:', i, '次超时')
# 使用文档校对功能
def doc_check(num):
    json_data = {"messages":[{"dataId":"ffjWT0VbndyZgzwaGakmpi86","hideInUI":False,"role":"user","content":[{"type":"file_url","name":"新建 文本文档.txt","url":"/api/common/file/read/新建+文本文档.txt?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJidWNrZXROYW1lIjoiY2hhdCIsInRlYW1JZCI6IjY3MTc2ZDk3NTM1YjQzMDFlOGQ0ODAzOSIsInVpZCI6IjY3MTc2ZDk3NTM1YjQzMDFlOGQ0ODA0NSIsImZpbGVJZCI6IjY4YjQzYjlkM2M2MjYxYTVhN2ZhYjVkNyIsImV4cCI6MTc1NzI0NzAwNSwiaWF0IjoxNzU2NjQyMjA1fQ.lZ6NIcrmSurTIUWvGqm4TP0NG8dUyv6j7rxIDuW2oEU"},{"type":"text","text":"文档校对"}]}],"variables":{"llm_type":1,"search_func":0},"responseChatItemId":responseChatItemId,"chatId":"dJwA98KgLdv0sJGcWakA41Ng","shareId":shareId,"outLinkUid":outLinkUid,"detail":True,"stream":True,"bizType":"doccheck","dtyFile":"","retainDatasetCite":True,"staffId":staffId,"visitFrom":"DTY"}

    for i in range(num):
        try:
            response = requests.post('https://reasoningai.elink.spic.com.cn/qaapi/qaassistant/api/v1/chat/completions',
                                     cookies=cookies, headers=headers, json=json_data, timeout=2)
            print('使用文档校对功能:', i, '次', response)
        except requests.exceptions.Timeout:
            print('使用文档校对功能 运行:', i, '次超时')

# 使用文档总结功能
def doc_summarize(num):
    json_data = {"messages":[{"dataId":"fiLeBDxSCaZbEVPP217SVjuI","hideInUI":False,"role":"user","content":[{"type":"file_url","name":"新建 文本文档.txt","url":"/api/common/file/read/新建+文本文档.txt?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJidWNrZXROYW1lIjoiY2hhdCIsInRlYW1JZCI6IjY3MTc2ZDk3NTM1YjQzMDFlOGQ0ODAzOSIsInVpZCI6IjY3MTc2ZDk3NTM1YjQzMDFlOGQ0ODA0NSIsImZpbGVJZCI6IjY4YjQzYmNmM2M2MjYxYTVhN2ZhYjZlNSIsImV4cCI6MTc1NzI0NzA1NSwiaWF0IjoxNzU2NjQyMjU1fQ.cS1kLxe6Ya5qpfpkksEK8AplaNIdXKtorFHGwGYdVig"},{"type":"text","text":"文档总结"}]}],"variables":{"llm_type":1,"search_func":0},"responseChatItemId":responseChatItemId,"chatId":"wmmHwvgChyoRcJHXFyh2oopp","shareId":shareId,"outLinkUid":outLinkUid,"detail":True,"stream":True,"bizType":"docsummary","dtyFile":"","retainDatasetCite":True,"staffId":staffId,"visitFrom":"DTY"}

    for i in range(num):
        try:
            response = requests.post('https://reasoningai.elink.spic.com.cn/qaapi/qaassistant/api/v1/chat/completions',
                                     cookies=cookies, headers=headers, json=json_data,timeout=2)
            print('使用文档总结功能:', i, '次', response)
        except requests.exceptions.Timeout:
            print('使用文档总结功能 运行:', i, '次超时')
# 使用提示词帮助功能
def prompt_help(num):
    json_data = {"messages":[{"dataId":"sVnYG3MN8ONS2o736PzfYYdE","hideInUI":False,"role":"user","content":"帮我起草一份单位名称关于事项的公告，要求是在这里输入要求，如明确事项依据、事项内容、生效时间、查询渠道，使用特此公告结尾，同步附件要求 。\r\n"}],"variables":{"llm_type":1,"search_func":0},"responseChatItemId":responseChatItemId,"chatId":"wmmHwvgChyoRcJHXFyh2oopp","shareId":shareId,"outLinkUid":outLinkUid,"detail":True,"stream":True,"bizType":"doctips","dtyFile":"","retainDatasetCite":True,"staffId":staffId,"visitFrom":"DTY"}

    for i in range(num):
        try:
            response = requests.post('https://reasoningai.elink.spic.com.cn/qaapi/qaassistant/api/v1/chat/completions',
                                     cookies=cookies, headers=headers, json=json_data, timeout=2)
            print('提示词帮助功能:', i, '次')

        except requests.exceptions.Timeout:
            print('提示词帮助功能:', i, '次超时')

# 中英互翻 功能
def doctrans(num):
    json_data = {"messages": [{"dataId": "pd4fbg8W0hfkNcve40UzWyAh", "hideInUI": False, "role": "user", "content": [
        {"type": "file_url", "name": "新建 文本文档.txt",
         "url": "/api/common/file/read/新建+文本文档.txt?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJidWNrZXROYW1lIjoiY2hhdCIsInRlYW1JZCI6IjY3MTc2ZDk3NTM1YjQzMDFlOGQ0ODAzOSIsInVpZCI6IjY3MTc2ZDk3NTM1YjQzMDFlOGQ0ODA0NSIsImZpbGVJZCI6IjY4YjQzOTEyM2M2MjYxYTVhN2ZhYWNlMyIsImV4cCI6MTc1NzI0NjM1NCwiaWF0IjoxNzU2NjQxNTU0fQ.VgdwVYgL79QXLC9gp4G1Z3NM1HRovOFZlyAtNkit9WQ"},
        {"type": "text", "text": "中英互译"}]}], "variables": {"llm_type": 1, "search_func": 0},
                 "responseChatItemId":responseChatItemId, "chatId":chatId,
                 "shareId": shareId, "outLinkUid":shareId, "detail": True, "stream": True,
                 "bizType": "doctrans", "dtyFile": "", "retainDatasetCite": True, "staffId": staffId, "visitFrom": "DTY"}

    for i in range(num):
        try:
            response = requests.post('https://reasoningai.elink.spic.com.cn/qaapi/qaassistant/api/v1/chat/completions',
                                     cookies=cookies, headers=headers, json=json_data, timeout=2)
            print('中英:', i, '次')

        except requests.exceptions.Timeout:
            print('中英:', i, '次超时')

# 电投壹“选取文件提问
def dty_file_question(num):
    json_data = {"messages": [{"dataId": "xhz135gckDZ4TrGp2gXVKlUd", "hideInUI": False, "role": "user", "content": [
        {"type": "file_url", "name": "新建 文本文档.txt",
         "url": "/api/common/file/read/新建+文本文档.txt?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJidWNrZXROYW1lIjoiY2hhdCIsInRlYW1JZCI6IjY3MTc2ZDk3NTM1YjQzMDFlOGQ0ODAzOSIsInVpZCI6IjY3MTc2ZDk3NTM1YjQzMDFlOGQ0ODA0NSIsImZpbGVJZCI6IjY4YjQzYjYxM2M2MjYxYTVhN2ZhYjU2NSIsImV4cCI6MTc1NzI0Njk0NSwiaWF0IjoxNzU2NjQyMTQ1fQ.GpTOUHS-5s3tIZlbTEYMuErVyD4fERn_CrnChktrIqA"},
        {"type": "text", "text": "这是什么？"}]}], "variables": {"llm_type": 1, "search_func": 0},
                 "responseChatItemId":responseChatItemId, "chatId":chatId,
                 "shareId": shareId, "outLinkUid":shareId, "detail": True, "stream": True,
                 "bizType": "common", "dtyFile": "DTY", "retainDatasetCite": True, "staffId": staffId, "visitFrom": "DTY"}


    for i in range(num):
        try:
            response = requests.post('https://reasoningai.elink.spic.com.cn/qaapi/qaassistant/api/v1/chat/completions',
                                     cookies=cookies, headers=headers, json=json_data, timeout=2)
            print('电投宜文件:', i, '次')

        except requests.exceptions.Timeout:
            print('电投宜文件:', i, '次超时')

# excel 助手
def excel_assistant(num):
    json_data = {"messages":[{"dataId":"wvmmYid72SlHrEEcSwVd2pLW","hideInUI":False,"role":"user","content":[{"type":"file_url","name":"学生表.xlsx","url":"/api/common/file/read/学生表.xlsx?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJidWNrZXROYW1lIjoiY2hhdCIsInRlYW1JZCI6IjY3MTc2ZDk3NTM1YjQzMDFlOGQ0ODAzOSIsInVpZCI6IjY3MTc2ZDk3NTM1YjQzMDFlOGQ0ODA0NSIsImZpbGVJZCI6IjY4YjQzY2ZjM2M2MjYxYTVhN2ZhYzY0YyIsImV4cCI6MTc1NzI0NzM1NiwiaWF0IjoxNzU2NjQyNTU2fQ.9qRn01IKbD46Trezs4VwOUtFCI-XNX69p1e0rUryrZg"},{"type":"text","text":"计算成绩的平均值"}]}],"variables":{"llm_type":0,"search_func":0},"responseChatItemId":responseChatItemId,"chatId":"lZGnbqXB663GKXgCK5GOfNdk","shareId":shareId,"outLinkUid":outLinkUid,"detail":True,"stream":True,"bizType":"excel","dtyFile":"","retainDatasetCite":True,"staffId":staffId,"visitFrom":"DTY"}
    for i in range(num):
        try:
            response = requests.post('https://reasoningai.elink.spic.com.cn/qaapi/qaassistant/api/v1/chat/completions',
                                     cookies=cookies, headers=headers, json=json_data, timeout=2)
            print('excel文件:', i, '次')

        except requests.exceptions.Timeout:
            print('excel文件:', i, '次超时')


# 点赞
def like(num):


    headers = {
        'Accept': 'application/json, text/plain, */*',
        # 'Accept-Encoding': 'gzip, deflate, br',
        'Accept-Language': 'zh-CN',
        'Authorization': Authorization,
        'Cache-Control': 'no-cache',
        'Connection': 'keep-alive',
        # 'Content-Length': '276',
        'Content-Type': 'application/json;charset=UTF-8',
        'Cookie': cookie,
        'Origin': 'https://reasoningai.elink.spic.com.cn',
        'Pragma': 'no-cache',
        'Referer': 'https://reasoningai.elink.spic.com.cn/deepseek?access_token=eyJhbGciOiJIUzUxMiJ9.eyJjcmVhdGVfdGltZSI6IjIwMjUtMDktMDEgMTA6MDE6NTciLCJhdXRoX3Rva2VuIjoiNzM5MjkzOTRjM2MwNDliZWE4ZTRjOGU2ZDIxMjUzMDYiLCJ1c2VyX2NvZGUiOiIxODMyMzQwNjcwMCIsInVzZXJfaWQiOiIxOTIyMjA3NTYzMjI2Njk4NTI5In0.v9I2f3RiZ0v2wvCNLiWtLNu7A8D5BE_6cYJLpZxAw4vPM4uqzWWLxSv3FTYxJ8_AURWAMwYHm1TUyWGM_WTddA',
        'Sec-Ch-Ua': '"Not.A/Brand";v="8", "Chromium";v="114"',
        'Sec-Ch-Ua-Mobile': '?0',
        'Sec-Ch-Ua-Platform': '"Windows"',
        'Sec-Fetch-Dest': 'empty',
        'Sec-Fetch-Mode': 'cors',
        'Sec-Fetch-Site': 'same-origin',
        'Smart-Proxy-Key': 'A903D245592C2E34426F14F0FA05016E',
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) WXWorkLocalPro/3.1.300 Chrome/114.0.5735.289 Electron/25.9.8 Safari/537.36 wxworklocal/3.1.300 WXWorklocalClientType/Windows wwlocal/1.0 MicroMessenger/6.3.22 Language/zh_CN wxwork/3.1.300 WXDrive/2.0 A903D245592C2E34426F14F0FA05016E',
    }

    json_data = {
        'appId': '67a86833ee92f8ff6e2ccebe',
        'chatId': 'qFzcJTxmrWt1Vf4sIGIIiiPt',
        'dataId': 'txQsB9pGJnR03Mrz0srRR77c',
        'userGoodFeedback': 'yes',
        'outLinkUid':outLinkUid,
        'staffId': staffId,
        'shareId': shareId,
        'visitFrom': 'DTY',
    }

    response = requests.post(
        f'https://reasoningai.elink.spic.com.cn/qaapi/qaassistant/api/core/chat/feedback/updateUserFeedback?outLinkUid={outLinkUid}&shareId={shareId}&staffId={staffId}&visitFrom=DTY',
        cookies=cookies,
        headers=headers,
        json=json_data,
    )
    # print('点赞:', response.text)
    for i in range(num):
        try:
            response = requests.post(
                f'https://reasoningai.elink.spic.com.cn/qaapi/qaassistant/api/core/chat/feedback/updateUserFeedback?outLinkUid={outLinkUid}&shareId={shareId}&staffId={staffId}&visitFrom=DTY',
                cookies=cookies,
                headers=headers,
                json=json_data,
            )
            time.sleep(1)
            print('点赞:', i, '次', response.text)

        except requests.exceptions.Timeout:
            print('点赞:', i, '次超时')

# 点踩
def unlike(num):

    headers = {
        'Accept': 'application/json, text/plain, */*',
        # 'Accept-Encoding': 'gzip, deflate, br',
        'Accept-Language': 'zh-CN',
        'Authorization': Authorization,
        'Cache-Control': 'no-cache',
        'Connection': 'keep-alive',
        # 'Content-Length': '276',
        'Content-Type': 'application/json;charset=UTF-8',
        'Cookie': cookie,
        'Origin': 'https://reasoningai.elink.spic.com.cn',
        'Pragma': 'no-cache',
        'Referer': 'https://reasoningai.elink.spic.com.cn/deepseek?access_token=eyJhbGciOiJIUzUxMiJ9.eyJjcmVhdGVfdGltZSI6IjIwMjUtMDktMDEgMTA6MDE6NTciLCJhdXRoX3Rva2VuIjoiNzM5MjkzOTRjM2MwNDliZWE4ZTRjOGU2ZDIxMjUzMDYiLCJ1c2VyX2NvZGUiOiIxODMyMzQwNjcwMCIsInVzZXJfaWQiOiIxOTIyMjA3NTYzMjI2Njk4NTI5In0.v9I2f3RiZ0v2wvCNLiWtLNu7A8D5BE_6cYJLpZxAw4vPM4uqzWWLxSv3FTYxJ8_AURWAMwYHm1TUyWGM_WTddA',
        'Sec-Ch-Ua': '"Not.A/Brand";v="8", "Chromium";v="114"',
        'Sec-Ch-Ua-Mobile': '?0',
        'Sec-Ch-Ua-Platform': '"Windows"',
        'Sec-Fetch-Dest': 'empty',
        'Sec-Fetch-Mode': 'cors',
        'Sec-Fetch-Site': 'same-origin',
        'Smart-Proxy-Key': 'A903D245592C2E34426F14F0FA05016E',
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) WXWorkLocalPro/3.1.300 Chrome/114.0.5735.289 Electron/25.9.8 Safari/537.36 wxworklocal/3.1.300 WXWorklocalClientType/Windows wwlocal/1.0 MicroMessenger/6.3.22 Language/zh_CN wxwork/3.1.300 WXDrive/2.0 A903D245592C2E34426F14F0FA05016E',
    }

    json_data = {
        'appId': '67a86833ee92f8ff6e2ccebe',
        'chatId': 'qFzcJTxmrWt1Vf4sIGIIiiPt',
        'dataId': 'txQsB9pGJnR03Mrz0srRR77c',
        'userBadFeedback': 'yes',
        'outLinkUid': outLinkUid,
        'staffId': staffId,
        'shareId': shareId,
        'visitFrom': 'DTY',
    }

    response = requests.post(
        f'https://reasoningai.elink.spic.com.cn/qaapi/qaassistant/api/core/chat/feedback/updateUserFeedback?outLinkUid={outLinkUid}&shareId={shareId}&staffId={staffId}&visitFrom=DTY',
        cookies=cookies,
        headers=headers,
        json=json_data,
    )

    for i in range(num):
        try:
            response = requests.post(
                f'https://reasoningai.elink.spic.com.cn/qaapi/qaassistant/api/core/chat/feedback/updateUserFeedback?outLinkUid={outLinkUid}&shareId={shareId}&staffId={staffId}&visitFrom=DTY',
                cookies=cookies,
                headers=headers,
                json=json_data,
            )
            time.sleep(1)
            print('点踩:', i, '次', response.text)

        except requests.exceptions.Timeout:
            print('点踩:', i, '次超时')

# 反馈
def feedback(num):
    headers = {
        'Accept': 'application/json, text/plain, */*',
        # 'Accept-Encoding': 'gzip, deflate, br',
        'Accept-Language': 'zh-CN',
        'Authorization': Authorization,
        'Cache-Control': 'no-cache',
        'Connection': 'keep-alive',
        # 'Content-Length': '276',
        'Content-Type': 'application/json;charset=UTF-8',
        'Cookie': cookie,
        'Origin': 'https://reasoningai.elink.spic.com.cn',
        'Pragma': 'no-cache',
        'Referer': 'https://reasoningai.elink.spic.com.cn/deepseek?access_token=eyJhbGciOiJIUzUxMiJ9.eyJjcmVhdGVfdGltZSI6IjIwMjUtMDktMDEgMTA6MDE6NTciLCJhdXRoX3Rva2VuIjoiNzM5MjkzOTRjM2MwNDliZWE4ZTRjOGU2ZDIxMjUzMDYiLCJ1c2VyX2NvZGUiOiIxODMyMzQwNjcwMCIsInVzZXJfaWQiOiIxOTIyMjA3NTYzMjI2Njk4NTI5In0.v9I2f3RiZ0v2wvCNLiWtLNu7A8D5BE_6cYJLpZxAw4vPM4uqzWWLxSv3FTYxJ8_AURWAMwYHm1TUyWGM_WTddA',
        'Sec-Ch-Ua': '"Not.A/Brand";v="8", "Chromium";v="114"',
        'Sec-Ch-Ua-Mobile': '?0',
        'Sec-Ch-Ua-Platform': '"Windows"',
        'Sec-Fetch-Dest': 'empty',
        'Sec-Fetch-Mode': 'cors',
        'Sec-Fetch-Site': 'same-origin',
        'Smart-Proxy-Key': 'A903D245592C2E34426F14F0FA05016E',
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) WXWorkLocalPro/3.1.300 Chrome/114.0.5735.289 Electron/25.9.8 Safari/537.36 wxworklocal/3.1.300 WXWorklocalClientType/Windows wwlocal/1.0 MicroMessenger/6.3.22 Language/zh_CN wxwork/3.1.300 WXDrive/2.0 A903D245592C2E34426F14F0FA05016E',
    }

    json_data = {
    "userCode": staffId,
    "feedbackContent": "1",
    "imageIds": "",
    "visitFrom": "DTY",
    "outLinkUid": outLinkUid,
    "staffId": staffId,
    "shareId": shareId
}



    for i in range(num):
        try:
            response = requests.post(
                f'https://reasoningai.elink.spic.com.cn/qaapi/qaassistant/api/userfeedback/add?{outLinkUid}&shareId={shareId}&staffId={staffId}&visitFrom=DTY',
                cookies=cookies,
                headers=headers,
                json=json_data,
            )
            time.sleep(1)
            print('反馈:', i, '次', response.text)

        except requests.exceptions.Timeout:
            print('反馈:', i, '次超时')



anyquestion(10)
upload(5)
doc_check(10)
doc_summarize(10)
prompt_help(10)
doctrans(10)
dty_file_question(5)
excel_assistant(10)
like(5)
unlike(5)
feedback(2)

